#include<iostream>
using namespace std;

class Point {
    private:
        float x,y;
    public:
        // if use default parameters,all set default.
        // or compile error of missing default argument on parameter XXX.
        // and don't overload default parameters function,parameters less
        // than default.
        Point(float x = 0,float y = 0):x(x),y(y) {
            cout << "x = " << (this->x) << ",y = " << (this->y) << endl;
        }
        Point(Point &);
        /**
        copy constructor must pass its first argument by reference.
        Point(Point a) {
            x = a.x;
            y = a.y;
        }
        */
};

Point::Point(Point& a) {
    x = a.x;
    y = a.y;
    cout << "copy construct function," << ",x = " << x << ",y = " << y << endl;
}

int main() {
    Point a;
    Point b(1);
    Point c(2,3);
    Point d(c);
    return 0;
}
